package com.ruoyi.park.controller;


import com.ruoyi.common.core.web.domain.JiMuReportResult;
import com.ruoyi.omp.api.MaterialReport;
import com.ruoyi.park.domain.vo.MaterialReportVO;
import com.ruoyi.park.service.IMaMaterialReportService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@Api(tags = "积木报表report")
@RestController
@RequestMapping("/jimuReport")
public class JimuReportController {

    @Autowired
    private IMaMaterialReportService maMaterialReportService;


    @GetMapping("/materialReportForMonth")
    @ApiOperation(value = "物资月报接口", notes = "月报接口")
    public JiMuReportResult materialReportForMonth(String materialName, String date) {
        List<MaterialReportVO> result = maMaterialReportService.reportDataDeal(materialName, date +"-01");
        return JiMuReportResult.success(result);
    }

}
